home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / bob_espo.swf / scripts / __Packages / StartPopUp.as < prev    next >
Text File  |  2013-04-24  |  2KB  |  58 lines

  1. class StartPopUp extends PopUp
  2. {
  3.    function StartPopUp(_mcRef)
  4.    {
  5.       super(_mcRef);
  6.    }
  7.    function doShow()
  8.    {
  9.       var _loc3_ = this.sState;
  10.       super.doShow();
  11.       if(_loc3_ == PopUp.sSTATE_IDLE)
  12.       {
  13.          Controller.getRef().pauseGame();
  14.       }
  15.    }
  16.    function doInstantShow()
  17.    {
  18.       var _loc3_ = this.sState;
  19.       super.doInstantShow();
  20.       if(_loc3_ == PopUp.sSTATE_IDLE)
  21.       {
  22.          Controller.getRef().pauseGame();
  23.       }
  24.    }
  25.    function doHide()
  26.    {
  27.       var _loc3_ = this.sState;
  28.       var _loc4_ = this.mcRef.mcState.mcPanel.mcSongs._currentframe;
  29.       super.doHide();
  30.       if(_loc3_ == PopUp.sSTATE_OPENED)
  31.       {
  32.          this.mcRef.mcState.mcPanel.mcSongs.gotoAndPlay(_loc4_);
  33.          Controller.getRef().unPauseGame();
  34.          CTRLGame.getRef().Screen.getInterface().doShow();
  35.       }
  36.    }
  37.    function doInstantHide()
  38.    {
  39.       var _loc3_ = this.sState;
  40.       super.doInstantHide();
  41.       if(_loc3_ == PopUp.sSTATE_OPENED)
  42.       {
  43.          Controller.getRef().unPauseGame();
  44.          CTRLGame.getRef().Screen.getInterface().doShow();
  45.       }
  46.    }
  47.    function clickStartButton()
  48.    {
  49.       Controller.getRef().playClickSound();
  50.       this.doHide();
  51.    }
  52.    function initPopUp()
  53.    {
  54.       this.mcRef.mcState.mcPanel.btnStart.onRollOver = Delegate.create(Main.getRef(),Main.getRef().rollOverButton);
  55.       this.mcRef.mcState.mcPanel.btnStart.onRelease = Delegate.create(this,this.clickStartButton);
  56.    }
  57. }
  58.